/**
 * Created by zeteng on 2017/6/19.
 */
Zepto(function(){
	//头像宽高等比
	var pic_w = $(".index_content header dt img").width();
	$(".index_content header dt img").height(pic_w);
	//开始游戏点击按钮
	var window_h = $(window).height();
	$(".index_data").css({"minHeight":window_h});
	$(".index_list ul li").on('touchend',function(){
		var index = $(this).index();
		$(".index_data").eq(index).css({"display":"block"}).siblings(".index_data").css({"display":"none"});
		$(this).addClass("current").siblings().removeClass("current");
	});

	$(".index_data:last-child ol").height(0);
	$(".chi_c>p:nth-of-type(2)").css({"display":"none"});
	$(".chi_c>p:nth-of-type(3)").css({"display":"none"});



	$(".goods ul li,.kxt_btn ul li").on('touchend',function(e){
		$(this).siblings().removeClass("current");
		$(this).addClass('current');
		if($(this).parent().parent().prop('class')=='kxt_btn'){
			showType = $(this).data('src');
		}else{
			$("#cur_show_good").val($(this).data('src'));
		}
		myChart.showLoading({text:'',textColor:'#9b9b9b',color:'#444',maskColor:'rgba(0, 0, 0, 0.2)'});
		if(showType==0) socket.send("show|"+$("#cur_show_good").val());
		else socket.send("show|"+$("#cur_show_good").val()+","+showType);
		//console.log("show|"+$("#cur_show_good").val()+","+showType);
	});
	if(localStorage.getItem("_teaching")==undefined && $("#userid").val()!='') {
		localStorage.setItem("_teaching", '1');
		novice();
	}

	/*签到按钮*/
	$("#_sign_dt").click(function(){
		$(this).hide();
		_Toast('今日签到完成');
	});
});

var curMin= 0;
var curHour = 0;
var ready=false;
var date = [];
var dataK = [];
var dataL = [];
var noPop=false;
var showType ='0';
var myChart = echarts.init( document.getElementById("container") );
myChart.showLoading({text:'',textColor:'#9b9b9b',color:'#444',maskColor:'rgba(0, 0, 0, 0.2)'});
function getDate(){
	D = new Date();
	curMin= D.getMinutes();
	curHour = D.getHours();
	curMin = (curMin<10)?'0'+curMin:curMin;
	curHour = (curHour<10)?'0'+curHour:curHour;
}
function processData(dat){
	ready=false;
	getDate();
	date.splice(0,date.length);
	dataL.splice(0,dataL.length);
	if(typeof(dat.K)=='undefined'){
		myChart.setOption(optionL);
		$("#_min").html(dat._min);
		$("#_max").html(dat._max);
		if(typeof(dat.time)=='object') { for(k in dat.time) date.push(dat.time[k]); };
		if(typeof(dat.value)=='object') { for(k in dat.time) dataL.push(dat.value[k]); };
		setL(dataL[dataL.length-1]);
	}else{
		dataK.splice(0,dataK.length);
		//console.log(dat);
		myChart.setOption(optionK);
		if(dat.K.length>0) {
			if(dat.K!=null) dat.K.forEach(function(v,i,o){
				date.push(v.time);
				a = [v.open, v.close, v.lowest, v.hightest];
				dataK.push( a );
			});
			date.push(curHour+":"+curMin);
			a[0] = a[1];
			dataK.push(a);
			setK(dataK[dataK.length-1][3]);
		}
	}
	myChart.hideLoading();
	ready=true;
}
function addStock(dat){
	if(ready==false) return true;
	//console.log(dat);
	oldValue = parseFloat($("#"+dat._code).html());if(oldValue=='NaN') oldValue=0;
	className = (oldValue>dat._curprice)?'green_d':'red_z';
	classNameColor = (oldValue>dat._curprice)?'green':'red';
	$("#"+dat._code).removeClass().addClass(classNameColor).html(dat._curprice+"元<i></i>").children("i").removeClass().addClass(className);
	if(("#_buy_cur_price").length>0 && $("#cur_show_good").val()==dat._code) $("#_buy_cur_price").removeClass().addClass( className ).html(dat._curprice);
	//对应插入data
	if(dat._code==$("#cur_show_good").val()){
		if(dat._curprice>parseFloat($("#_max").html())) $("#_max").html(dat._curprice);
		if(dat._curprice<parseFloat($("#_min").html())) $("#_min").html(dat._curprice);
		curr_time = dat._time.substr(11);
		last_time = date[date.length-1];
		//console.log(dat);
		if($(".kxt_btn").find('.current').data('src')=='0') {
			if(typeof(last_time)!='undefined' && last_time.substring(0,5)!=curr_time.substring(0,5)) {
				date.push(curr_time.substring(0,5));
				dataL.push(dat._curprice);
				date.shift();
				dataL.shift();
			}
			setL(dat._curprice);
		}else{
			//K
			last_data = dataK[dataK.length-1];
			cp = parseFloat(dat._curprice);
			if(last_data==undefined) return;
			sp = last_data[1];
			last_data = [ last_data[0], dat._curprice , cp<parseFloat(last_data[2])?cp:last_data[2], cp>parseFloat(last_data[3])?cp:last_data[3] ];
			console.log(dat._time.substr(14,2)+"|"+curMin+"|"+showType+"|"+(parseInt(curMin)+parseInt(showType)));
			if(parseInt(dat._time.substr(14,2))!=(parseInt(curMin)+parseInt(showType))){
				dataK.pop();
			}else{
				getDate();
				date.push(curHour+":"+curMin);
				last_data[0] = last_data[1];
			}
			dataK.push(last_data);
			setK(last_data[1]);
		}
	}
}

function changeK(v){
	myChart.showLoading({text:'',textColor:'#9b9b9b',color:'#444',maskColor:'rgba(0, 0, 0, 0.2)'});
	showType=v;
	if(v==0)myChart.setOption(optionL);
	else myChart.setOption(optionK);
	myChart.hideLoading();
}
function recharge(d){ if(d.status==1) document.location.href=d.url;else popPerfect();}
function sign(d){ if(d.status==1){$("#_sign_dt").remove();_Toast('今天簽到完成了！');}else popLogin(1,'/Index',false);}
function buyStock(t){
	_Tip('',99999);
	$.get('/Product/prepareOrder',{buy_type:t,buy_time:$("#buy_time").val(),product:$("#cur_show_good").val()},function(data){
		noPop=true;
		lclose();
		if(data.error=='-100') popLogin();
		else{
			layer.open({type:1,shadeClose:false,style:'background:none;width:99%',content:data.content,end:function(){noPop=false;} });
			if(data.status==1) {
				$(".buys_money ul li").on('touchend',function(){
					newPrice =  parseInt($(this).data('src'));
					$(this).siblings().removeClass();$(this).addClass('current'); $("#buy_price").val(newPrice);$(".mr_money").html(newPrice);
					$(".yj_money").html( (newPrice-newPrice*parseFloat($("#tax").val())/100)*(1+parseFloat(data.rate)) );
				});
				$(".coupon dd").on('touchend',function(){ $(this).siblings().removeClass();$(this).addClass('current'); $("#coupon").val($(this).data('src'));});
				$("#_buy_cur_price").html( $("#"+$("#cur_show_good").val()).html() );
				$(".yj_money").html(  (parseInt($("#buy_price").val())-parseFloat($("#tax").val())) * (1+parseFloat(data.rate)) );
			}
		}
	},'json');
}
optionL = {
	backgroundColor: '#000000',
	gridIndex:0,
	grid: {top:13,bottom:0,right:-3,left:-10,containLabel:true},
	tooltip: {trigger: 'axis',
		formatter:function(params){
			return '<div style="background:#111111;' +
				'border-radius:5px;padding:3px 3px 3px 3px;color:#eeeeee">时间：'+params[0].axisValue+'<br/>价格：'+params[0].value+'</div>';
		}
	},
	legend:{show:false,padding:0,top:0},
	title:{show:false},
	xAxis:{type: 'category',boundaryGap:[0,0],axisTick: {show: true,lineStyle:{color:'#9b9b9b'} },
		axisLabel:{textStyle:{color:'#9b9b9b'},formatter:function(v,index){return v.substring(0,5);},inside:false },
		splitLine:{show:false ,lineStyle:{color:'#9b9b9b',type:'dashed',opacity:0.2} },
		data:[]
	},
	yAxis:{type: 'value',boundaryGap: [0.2, 0.2],
		axisLabel:{show:false,inside:true,textStyle:{color:'#9b9b9b',fontSize:8},formatter:function (value, index) {
			return value.toFixed(2);
		} },
		axisTick: {show:false,inside:true,lineStyle:{color:'#9b9b9b'} },
		splitLine: {show:true,lineStyle:{color:'#9b9b9b',type:'solid',opacity:0.2} },
		scale:true,
		zlevel:10
	},
	series: [{
		name:'分时图',type:'line',smooth:true,symbol:'none',
		itemStyle:{
			//normal:{color:'#f1d220',lineStyle:{width:1,opacity:0.4}}
			normal:{color:'#fbd073',lineStyle:{width:1,opacity:1.4}}
		},
		areaStyle: {
			normal: {
				color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
					offset: 0,
					color: '#fbd073'
				}, {
					offset: 1,
					color: '#fbd073'
				}])
			}
		},
		data:[]
	}],
	dataZoom: [{
		textStyle: {
			color: '#8392A5'
		},
		handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
		handleSize: '80%',
		dataBackground: {
			areaStyle: {
				color: '#8392A5'
			},
			lineStyle: {
				opacity: 0.8,
				color: '#8392A5'
			}
		},
		handleStyle: {
			color: '#fff',
			shadowBlur: 3,
			shadowColor: 'rgba(0, 0, 0, 0.6)',
			shadowOffsetX: 2,
			shadowOffsetY: 2
		}
	}, {
		type: 'inside'
	}],
};
optionK = {
	backgroundColor: '#000000',
	gridIndex:0,
	grid: {top:13,bottom:0,right:10,left:-5,containLabel: true},
	tooltip: {trigger: 'axis',
		formatter: function (params) {
			var res =  params[0].name;
			res += '<br/> 开盘 : ' + params[0].value[1] + '<br/>最高 : ' + params[0].value[4];
			res += '<br/> 收盘 : ' + params[0].value[2] + '<br/>最低 : ' + params[0].value[3];
			return res;
		}
	},
	legend:{show:false,padding:0,top:0},
	title: {show:false },
	xAxis: {
		type: 'category',
		scale: true,boundaryGap: true,
		axisTick: {show: true,lineStyle:{color:'#9b9b9b'} },
		axisLabel:{inside:false,textStyle:{color:'#9b9b9b'} },
		splitLine: {show:false ,lineStyle:{color:'#9b9b9b',type:'dashed',opacity:0.2} },
		data:[]
	},
	yAxis: {
		axisLabel:{show:false,inside:true,textStyle:{color:'#c0c0c0',opacity:0.2},formatter: function (value, index) {
			return value.toFixed(2);
		} },
		axisTick: {show:false,inside:true,lineStyle:{color:'#9b9b9b'} },
		splitLine: {show:true ,lineStyle:{color:'#9b9b9b',type:'solid',opacity:0.2} },
		scale:true,
		zlevel:10
	},
	series: [
		{ name:'日K',
			type:'candlestick',
			data:[],
			itemStyle:{ normal:{color:'red',color0:'green'} },
		}
	],
	dataZoom: [{
		textStyle: {
			color: '#8392A5'
		},
		handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
		handleSize: '80%',
		dataBackground: {
			areaStyle: {
				color: '#8392A5'
			},
			lineStyle: {
				opacity: 0.8,
				//color: '#8392A5'
				color: 'red'
			}
		},
		handleStyle: {
			color: '#fff',
			shadowBlur: 3,
			shadowColor: 'rgba(0, 0, 0, 0.6)',
			shadowOffsetX: 2,
			shadowOffsetY: 2
		}
	}, {
		type: 'inside'
	}],
};

function setL(lv){
	myChart.setOption({xAxis:{data:date},series:[{name:'分时图',data:dataL,
		markLine:{label:{normal:{show:true}},symbol:['none','none'],data:[{name:'curp',yAxis:lv,label:{
			normal:{position:'middle',formatter:function(p){return parseFloat(p.value).toFixed(2);}}}}]},
		itemStyle:{
			normal:{color:'#ffe337',lineStyle:{width:2,opacity:0.6}}
		},
		areaStyle: {
			normal:{
				color: {type: 'linear',x: 0, y: 0,x2: 0,y2: 1,
					colorStops: [{offset:0,color:'#d8b631'},{offset:1,color:'#fbd073'}],
					globalCoord: false
				},
				opacity:0.4
			}
		},
		smooth:true,
	}]});
}
function setK(lv){
	myChart.setOption({
		xAxis: {data: date},
		series: [{name: '日K',data: dataK,markLine: {symbol: ['none','none'],data:[{name: 'curp',yAxis:lv,label:{
			normal:{position:'middle',formatter:function(p){return parseFloat(p.value).toFixed(2);}}}}]},
			markPoint:{data:[{name:'当前',coord:[date[date.length-1],parseFloat(lv).toFixed(2)],label:{normal:{offset:[-10,0],textStyle:{fontSize:6,color:'#ffff00'}}} }]}
		}],
	});
}

function addItem(dat){
	$('<dl><dt>'+dat.time+'</dt><dd>'
		+dat.name+'</dd><dd class="'
		+(dat.buy_state==1?'red':'green')+'">'
		+dat.buy+'</dd><dd><b>'
		+dat.price+'</b><span><i style="display: block;height: 100%;"></i></span></dd></dl>').insertAfter($("#index_data_0 dl").eq(0) );
	max_length = $("#index_data_0 dl").length;
	if(max_length > 21 ){
		$("#index_data_0 dl").eq(max_length-1).remove();
	}
}

d = new Date(Date.parse($("#_inputdate").val().replace(/-/g, "/")));
cd = d.getTime();
setInterval(function (){
	cd+=1000;
	d = new Date(cd);
	_hours = d.getHours(),_minutes=d.getMinutes(),_second=d.getSeconds();_second = _second<10?('0'+_second):_second;
	d = (_hours<10?('0'+_hours):_hours) + '：' + (_minutes<10?('0'+_minutes):_minutes) + '：' + _second;
	$("#_time").html(d);
	$("[id*=_cdown]").each(function(i,v){
		t = parseInt($(this).html());
		if(t--<=0) {
			reposition();
		}else{
			vt=(t<10)?'0'+t:t;
			$(this).html(vt);
		}});
	if($("#_cdown2").length>0 && !isNaN(parseInt($("#_cdown2").html()))){
		c2 = parseInt($("#_cdown2").html());
		chg_p = parseFloat($("#_buy_cur_price").html());
		cur_p = parseFloat($("#_buy_price").html());
		if(cur_p<chg_p&&$("#_buy_type").val()=='-1') $("#_re2").removeClass().addClass('green').html('虧');
		else if(cur_p>chg_p&&$("#_buy_type").val()=='-1') $("#_re2").removeClass().addClass('red').html('盈');
		else if(cur_p<chg_p&&$("#_buy_type").val()=='1') $("#_re2").removeClass().addClass('red').html('盈');
		else if(cur_p>chg_p&&$("#_buy_type").val()=='1') $("#_re2").removeClass().addClass('green').html('虧');
		else $("#_re2").removeClass().html('平');
		$("#_cdown2").html((c2<10)?'0'+c2:c2);
		if(c2--<=0){
			$("#_rh").html('&nbsp;');
			$("#_result").html('結算中，請稍候');
			showResult($("#_orderno").val());
		}else if(c2==9 && !$("#_cdown2").hasClass('heart')) {
			$("#_cdown2").addClass("heart");
		}
	}
},1000);
//提交新订单
function doSubmitPrepareOrder(){
	noPop=true;
	$("#buy_point").val($("#_buy_cur_price").html());
	$.post('/Order/create',$("#prepare_order").serialize(),function(data){
		layer.closeAll();
		if(data.status==1){
			$("#_balance").html(data.balance);
			if($("#buy_time").val()==60) layer.open({type:1,style:'background:none;width:99%',shadeClose:false,content:data.content});
			else _Tip('下單成功，請在持倉訂單中查看。', 4);
			//更新自己的持仓状态
			reposition();
		}else{
			layer.open({type:1,style:'background:none;width:100%;',content:data.error,end:function(){noPop=false;}});
		}
	},'json');
}
function reposition(){
	$.post('/Order/position',function(data){
		if(data.content0.length>1) $("#_dot").addClass('dot');else $("#_dot").removeClass();
		$(".index_data").eq(1).html(data.content0);
		$(".index_data").eq(2).html(data.content1);
		$("#_balance").html(data.balance);
		$("#hold_0,#hold_1,#hold_2").hide();
		if(typeof(data.hold)=='object') {
			for(i=0;i<data.hold.length;i++) $("#hold_"+data.hold[i].p).show().html(data.hold[i].v);
		}
	},'json');
}
/*增加新的list图标中的数据*/
function showResult(orderno){
	setTimeout(function(){
		$.post('/Order/checkOrder',{orderno:orderno},function(data){
			if(data.balance==false) lclose();
			/*else if(data.balance.indexOf('B')==0) {p=data.balance.split('_');$("#_result").html(p[1]);$("#_result_p").html('當前<em>持平</em>').addClass('_result_p');}
			 else $("#_result").html((parseFloat(data.balance)>0)?('+'+data.balance):data.balance);
			 if(data.balance>0) {$("#_result_p").html('當前<em class="red">盈</em>').addClass('_result_p');}
			 else if(data.balance<0) {$("#_result_p").html('當前<em class="green">虧</em>').addClass('_result_p');}
			 reposition();
			 if(typeof(data.orderRow)!='undefined') {
			 layer.closeAll();
			 direction = '買'+(data.orderRow.buy_direct==1?'漲':'跌');
			 if(data.orderRow.complete_fee>0) win(data.orderRow.buy_product_name,data.orderRow.complete_fee,data.orderRow.tax_total_fee,data.orderRow.buy_price_total_price,direction);
			 else loss(data.orderRow.buy_product_name,data.orderRow.buy_price_total_fee,direction);
			 }*/
			if(data.balance.indexOf('B')==0) {p=data.balance.split('_');$("#_result").html(p[1]);$("#_result_p").html('當前<em>持平</em>').addClass('_result_p');}
			else{
				layer.closeAll();
				direction = '买'+(data.orderRow.buy_direct==1?'涨':'跌');
				if(data.orderRow.complete_fee>0) win(data.orderRow.buy_product_name,data.orderRow.complete_fee,data.orderRow.tax_total_fee,data.orderRow.buy_price_total_fee,direction);
				else loss(data.orderRow.buy_product_name,data.orderRow.buy_price_total_fee,direction);
			}
		},'json');
	}, 1200);
}
function rePop(oid){
	$.post('/Order/rPopup',{orderno:oid},function(data){if(data.status==1){_Err(data.content);
		$("#cur_show_good").val(data.buy_product);$(".goods ul li").each(function(i){ if($(this).data('src')==data.buy_product)$(this).addClass('current');else $(this).removeClass(); });
	}else _Toast(data.error);},'json');
}
//新手引导操作
function novice(){
	$("nav").animate({"opacity":"0.1"});
	function append_con_one(){
		$("#maskIn1").css({"display":"block"}).siblings("div").css({"display":"none"});
		//显示高亮
		$("section .goods").siblings().animate({"opacity":"0.1"});
		//从第一步跳转到第二步
		$("#maskIn1 .on_c_next").click(function(){
			append_con_two();
		});

	}
	function append_con_two(){
		$(window).scrollTop(0);
		$("#maskIn2").css({"display":"block"}).siblings("div").css({"display":"none"});
		$("section .game_time").animate({"opacity":"1"}).siblings().animate({"opacity":"0.1"});
		$(".swiper-container").siblings().animate({"opacity":"0.1"});
		$(".swiper-container").children("i").animate({"opacity":"0.1"});
		//从第二步返回第一步
		$("#maskIn2 .mask_true").click(function(){
			append_con_one();
		});
		$("#maskIn2 .on_c_next").click(function(){
			append_con_three();
		})
	}
	function append_con_three(){
		$(window).scrollTop(150);
		$("#maskIn3").css({"display":"block"}).siblings("div").css({"display":"none"});
		$("section .game_time").animate({"opacity":"1"}).siblings().animate({"opacity":"0.1"});
		$(".swiper-container").siblings().animate({"opacity":"0.1"});
		$(".swiper-container").children("div").animate({"opacity":"0.1"});
		$(".kxt").animate({"opacity":"1"});
		$("#maskIn3 .mask_true").click(function(){
			append_con_two();
		});
		$("#maskIn3 .on_c_next").click(function(){
			append_con_four();
		})

	}
	function append_con_four(){
		$(window).scrollTop(0);
		$("#maskIn4").css({"display":"block"}).siblings("div").css({"display":"none"});
		$("section").children().animate({"opacity":"0.1"});
		$("#maskIn4 .mask_true").click(function(){
			append_con_three();
		});
		$("#maskIn4 .on_c_next").click(function(){
			append_con_five();
		})


	}
	function append_con_five(){
		$(window).scrollTop(0);
		$("#maskIn5").css({"display":"block"}).siblings("div").css({"display":"none"});
		$("section").children().animate({"opacity":"0.1"});

		$("#maskIn5 .on_c_next").click(function(){
			$(this).parent("div").css({"display":"none"});
			$("#novice").animate({"opacity":"1"});
			$("section>*").animate({"opacity":"1"});
			$(".swiper-container").children().animate({"opacity":"1"});
			$(".game_time").children().animate({"opacity":"1"});
			$("nav").animate({"opacity":"1"});
		})

	}
	var window_h = $(window).height();
	$("body>div").height(window_h);
	$("#novice").animate({"opacity":"0.1"});
	//执行第一个动画
	append_con_one();
	$(".mask_guan").click(function(){
		$(this).parent("div").css({"display":"none"});
		$("#novice").animate({"opacity":"1"});
		$("section>*").animate({"opacity":"1"});
		$(".swiper-container").children().animate({"opacity":"1"});
		$(".game_time").children().animate({"opacity":"1"});
		$("nav").animate({"opacity":"1"});
	});

}
$("#novice").click(function(){
	novice();
});

function win(data_goods,money,service_charge,buy_amount,direction){
	var window_h = $(window).height();
	var o_div = $("<div class='mask_profit'></div>");
	o_div.height(window_h);
	$("body").append(o_div);
	$(".mask_profit").css({"background":"rgba(0,0,0,0.8)","width":"100%","position":"fixed","left":"0","top":"0","z-index":"600"});
	var content = $("<div class='profit'>\
						<i class='not_win_colos'></i>\
							<dl>\
							<dt>盈利"+money+"元！</dt>\
						<dd>合约："+data_goods+" <span style='color: #E35C58;margin-left: 4%;'>"+buy_amount+direction+"</span></dd>\
						<dd>手续费："+service_charge+"元</dd>\
						</dl>\
						<a href='javascript:;' class='jixu'>继续下单 &gt;&gt;</a>\
					</div>");
	o_div.append(content);
	$(".not_win_colos").click(function(){
		console.log(1);
		$(".mask_profit").remove();
	});
	$(".profit a").click(function(){
		console.log(1);
		$(".mask_profit").remove();
	});
}
function loss(data_goods,buy_amount,direction){
	var window_h = $(window).height();
	var o_div = $("<div class='mask_profit'></div>");
	o_div.height(window_h);
	$("body").append(o_div);
	$(".mask_profit").css({"background":"rgba(0,0,0,0.8)","width":"100%","position":"fixed","left":"0","top":"0","z-index":"600"});
	var content = $('<div class="profit profit_not">\
						<i class="not_win_colos"></i>\
							<dl>\
							<dt style="margin-bottom: 5%;">很遗憾<br>继续努力!</dt>\
						<dd><span class="red" style="font-size: 0.8125rem;">'+data_goods+buy_amount+direction+'</span></dd>\
						</dl>\
						<a href="javascript:;" class="fanhui">确认返回 &gt;&gt;</a>\
					</div>');
	o_div.append(content);
	$(".not_win_colos").click(function(){
		console.log(1);
		$(".mask_profit").remove();
	});
	$(".profit a").click(function(){
		console.log(1);
		$(".mask_profit").remove();
	});
}


